#include<iostream>
using namespace std;
const int N = 25;
int arr[N][N];
int main()
{
	int n;
	cin >> n;
	for (int i = 0; i < n; i++) {
		for (int j = 0; j <= i; j++) {
			if (i == 0 || i == 1 || j == 0) {
				arr[i][j] = 1;
			}
			if (i == j) {
				arr[i][i] = 1;
			}
			else {
				arr[i][j] = arr[i - 1][j] + arr[i - 1][j - 1];
			}
		}
	}
	for (int i = 0; i < n; i++) {
		for (int j = 0; j <= i; j++) {
			if (j == i) {
				cout << arr[i][j];
			}
			else {
				cout << arr[i][j] << " ";
			}
		}
		cout << endl;
	}
	return 0;
}